10 research outputs found

    Improving the Precision of Type Inference Algorithms with Lightweight Heuristics

    Get PDF
    Dynamically-typed languages allow faster software development by not posing the type constraints. Static type information facilitates program comprehension and software maintenance. Type inference algorithms attempt to reconstruct the type information from the code, yet they suffer from the problem of false positives or false negatives. The use of complex type inference algorithms is questionable during the development phase, due to their performance costs. Instead, we propose lightweight heuristics to improve simple type inference algorithms and, at the same time, preserve their swiftness

    Inferring Types by Mining Class Usage Frequency from Inline Caches

    Get PDF
    International audienceDynamically typed languages allow developers to write more expressive source code, but their lack of static information about types of variables increases the complexity of a program. Static type information about types of variables facilitates program comprehension and maintenance. Simple type inference algorithms suffer from the problem of false positives or negatives, thus complex approaches are required to avoid this problem. We propose a simple heuristic that uses easily accessible run-time information about the usage of each class as a receiver type for a message send. This frequency serves as a proxy for the likelihood that a run-time type of the variable is that class and it is used to promote the correct type towards the top of the list of possible types for a variable. Our evaluation of a proof-of-concept prototype implemented in Pharo Smalltalk shows that our heuristic is reasonably precise to detect correct types on average in 65.92% to 82.83% of cases

    The sugars content of parental and new perspective descendant strawberry genotypes potential approach for the future selection process

    Get PDF
    Besides being one of the most commercially grown berry fruits, strawberries (Fragaria x annanassa Duch.) are known for their nutritional value, richness in polyphenols, and antioxidant capacity. New directions of strawberry breeding and selection are set towards premium fruit quality, high sugars content, and desirable sugars/total acids ratio (sweet index, SI), which represent some of the main prerequisites for selecting new breeding materials [1]. With this intention, a set of 24 strawberry genotypes was cultivated, including 12 parental varieties and 12 of their descendants - perspective candidates obtained by crossing the parental varieties mentioned above. A total of eleven sugars were quantified using High-Performance Anion-Exchange Chromatography with Pulsed Amperometric Detection (HPAEC-PAD). Results implied that glucose, sorbitol, sucrose, and melibiose content were the most important sugars in separating the fruits of parental varieties and their progeny [2]. Results showed that old, parental varieties had a significantly higher content of glucose and sucrose, while new perspective genotypes had higher sorbitol and melibiose content (Fig.2). PCA analysis confirmed that parental (samples 1-12) and descendant genotypes (samples 13-24), could be discriminated according to sugars profile i.e. that these four sugars have an effect on their differentiation (Fig.1). This was in accordance with Mann-Whitney U test results (Fig.2). Fig.1. Principal Component Analysis - The difference between parental and descendant genotypes; score plot (A) ā€“ parental samples (PS) 1-12, descendant (DS) samples 13-24, and loading plot (B) ā€“ sugar components. Acknowledgments: This work has been supported by the Ministry of Education, Science, Technological Development and Innovation of Republic of Serbia, Contract number: 451-03-47/2023-01/200168 and 451-03-47/2023-01/200288., as well as company ā€œZeleni hit d.o.o.ā€ from Belgrade, Serbia and ā€œBerryLabā€ breeding consortium from Italy. References: [1] L. Mazzoni, L. di Vittori, F. Balducci, T.Y. Forbes-Hernandez, F. Giamperi, M. Battino, B. Mezzeti, F. Capocasa, Scientia Horticulturae, 261: 108945 (2019). [2] M. Fotirić AkÅ”ić, T. Tosti, M. Sredojević, J. Milivojević, M. Meland, M. Natić, Plants, 8: 205 (2019).Poster: [https://cherry.chem.bg.ac.rs/handle/123456789/5975

    Effect-Directed Profiling of Strawberry Varieties and Breeding Materials via Planar Chromatography and Chemometrics

    Get PDF
    Strawberries are an important fruit in the European diet because of their unique taste and high content of essential nutrients and bioactive compounds. The anthocyanins are known to be colorful phenolics in strawberries. In 17 samples of six strawberry cultivars produced in Serbia, i.e., the common varieties Alba, Asia, and Clery as well as promising breeding materials (11.29.11, 11.34.6, and 11.39.3), the anthocyanin profile as well as antimicrobial and antioxidative activity profiles were determined. All investigated extracts showed antioxidative and antibacterial activities against Gram-negative Aliivibrio fischeri. The responses were quite similar in number and intensity. The HPTLC-DPPHā€¢ scavenging assay and HPTLC-Aliivibrio fischeri bioassay coupled with high-resolution mass spectrometry identified pelargonidin-3-O-glucoside (Pg-3-glc) as the main anthocyanin and prominent antioxidative and antimicrobial compound in strawberries. The density functional theory calculations at the M06-2X/6-31+G(d,p) level showed that Pg-3-glc quenches free radicals via sequential proton loss electron transfer mechanism in water and in pentyl ethanoate, where the 5-OH group is the most reactive site for proton and hydrogen atom transfer. The results were confirmed via spectrophotometry. The highest total phenolic content was found in Clery and 11.39.3, while statistically significant differences between the genotypes regarding the antioxidant activity were not confirmed. Although very similar in the anthocyanin, antioxidative, and antimicrobial profile patterns, the strawberry genotypes were successfully classified using principal component analysis

    Content and Distribution of Macroelements, Microelements, and Rare-Earth Elements in Different Tomato Varieties as a Promising Tool for Monitoring the Distinction between the Integral and Organic Systems of Production in Zeleni hitā€”Official Enza and Vitalis Trial and Breeding Station

    Get PDF
    The identification of agricultural food production systems has gained importance in order to protect both human health and the environment. The importance of organic production system of agriculture which involves the application of natural processes and substances, and limits or completely eliminates the use of synthesized means is emphasized. Knowledge of the mineral composition in tomato samples can be used as a potent tool in the identification of chemical markers as potential indicators of the farming system. A set of tomato samples taken from two factorial randomized trials were comprehended eight different varieties, belonging to four tomato types: largeā€”BEEF and CLUSTER, and mini and midiā€”CHERRY and PLUM tomatoes, cultivated under two different farming systems: integral (IPM) and organic (O) were characterized based on the composition of the minerals. A total of 44 elements were quantified. To establish criteria for the classification of the samples and confirm a unique set of parameters of variation among the types of production, sophisticated chemometric techniques were used. The results indicate that the accumulation of elements varies between 8 tomato varieties and 2 different growing systems. The contents of Al, Mn, As, Pb, and some of the rare-earth elements (REEs) are able to distinguish between production types. Examination of different hybrids, which belong to different types in two production systems: organic and integral within Zeleni hit (official Enza and Vitalis trial and breeding station), was done with the aim of reaching a methodology of diversification, ie complete traceability of organic production, and to contribute to distinguishing types of agricultural systems and enhancing the possibility of acquiring a valuable authenticity factor about the type of agricultural production system employed for the cultivation of tomatoes

    The sugars content of parental and new perspective descendant strawberry genotypes potential approach for the future selection process

    Get PDF
    Besides being one of the most commercially grown berry fruits, strawberries (Fragaria x annanassa Duch.) are known for their nutritional value, richness in polyphenols, and antioxidant capacity. New directions of strawberry breeding and selection are set towards premium fruit quality, high sugars content, and desirable sugars/total acids ratio (sweet index, SI), which represent some of the main prerequisites for selecting new breeding materials [1]. With this intention, a set of 24 strawberry genotypes was cultivated, including 12 parental varieties and 12 of their descendants - perspective candidates obtained by crossing the parental varieties mentioned above. A total of eleven sugars were quantified using High-Performance Anion-Exchange Chromatography with Pulsed Amperometric Detection (HPAEC-PAD). Results implied that glucose, sorbitol, sucrose, and melibiose content were the most important sugars in separating the fruits of parental varieties and their progeny [2]. Results showed that old, parental varieties had a significantly higher content of glucose and sucrose, while new perspective genotypes had higher sorbitol and melibiose content (Fig.2). PCA analysis confirmed that parental (samples 1-12) and descendant genotypes (samples 13-24), could be discriminated according to sugars profile i.e. that these four sugars have an effect on their differentiation (Fig.1). This was in accordance with Mann-Whitney U test results (Fig.2).Fig.1. Principal Component Analysis - The difference between parental and descendant genotypes; score plot (A) ā€“ parental samples (PS) 1-12, descendant (DS) samples 13-24, and loading plot (B) ā€“ sugar components.Acknowledgments: This work has been supported by the Ministry of Education, Science, Technological Development and Innovation of Republic of Serbia, Contract number: 451-03-47/2023-01/200168 and 451-03-47/2023-01/200288., as well as company ā€œZeleni hit d.o.o.ā€ from Belgrade, Serbia and ā€œBerryLabā€ breeding consortium from Italy.References:[1] L. Mazzoni, L. di Vittori, F. Balducci, T.Y. Forbes-Hernandez, F. Giamperi, M. Battino, B. Mezzeti, F. Capocasa, Scientia Horticulturae, 261: 108945 (2019).[2] M. Fotirić AkÅ”ić, T. Tosti, M. Sredojević, J. Milivojević, M. Meland, M. Natić, Plants, 8: 205 (2019).Abstract: [https://cherry.chem.bg.ac.rs/handle/123456789/5974

    Exploring Cheap Type Inference Heuristics in Dynamically Typed Languages

    No full text
    Although dynamically typed languages allow developers to be more productive in writing source code, their lack of information about types of variables is one of the main obstacles during program comprehension. Static type information helps developers to decrease software maintenance time. Inferring the types of variables requires complex algorithms in order to avoid false positives or negatives. Their main aim is to shorten the list of possible types for a variable. We have developed a couple of cheap heuristics that use easily accessible information about the presence of each class in the available source code to promote the correct type towards the top of the list of possible types for a variable. Our evaluation of a proof-of-concept prototype, implemented in Pharo Smalltalk, shows that both for domain- specific types and standard libraries these heuristics tend to work well. The evaluated heuristics prove to be reasonably precise, promoting the correct types of a variable towards the top of the list in 50.67 up to 89.09 of cases on average, depending on the applied heuristic. The heuristic that has proven to be the best was compared with one existing type inference algorithm and the best heuristic yields significantly better results with less effort

    Mining Inline Cache Data to Order Inferred Types in Dynamic Languages

    Get PDF
    The lack of static type information in dynamically-typed languages often poses obstacles for developers. Type inference algorithms can help, but inferring precise type information requires complex algorithms that are often slow. A simple approach that considers only the locally used interface of variables can identify potential classes for variables, but popular interfaces can generate a large number of false positives. We propose an approach called inline-cache type inference (ICTI) to augment the precision of fast and simple type inference algorithms. ICTI uses type information available in the inline caches during multiple software runs, to provide a ranked list of possible classes that most likely represent a variable's type. We evaluate ICTI through a proof-of-concept that we implement in Pharo Smalltalk. The analysis of the top-n+2 inferred types (where n is the number of recorded run-time types for a variable) for 5486 variables from four different software systems shows that ICTI produces promising results for about 75 of the variables. For more than 90 of variables, the correct run-time type is present among first six inferred types. Our ordering shows a twofold improvement when compared with the unordered basic approach, i.e., for a significant number of variables for which the basic approach offered ambiguous results, ICTI was able to promote the correct type to the top of the list

    It's Duck (Typing) Season!

    No full text
    International audienceDuck typing provides a way to reuse code and allow a developer to write more extensible code. At the same time, it scatters the implementation of a functionality over multiple classes and causes difficulties in program comprehension. The extent to which duck typing is used in real programs is not very well understood. We report on a preliminary study of the prevalence of duck typing in more than a thousand dynamically-typed open source software systems developed in Smalltalk. Although a small portion of the call sites in these systems is duck-typed, in half of the analysed systems at least 20% of methods are duck-typed

    Exploiting Type Hints in Method Argument Names to Improve Lightweight Type Inference

    No full text
    International audienceThe lack of static type information is one of the main obstacles to program comprehension in dynamically-typed languages. While static type inference algorithms try to remedy this problem, they usually suffer from the problem of false positives or false negatives. In order to partially compensate for the lack of static type information, a common practice in dynamically-typed languages is to name or annotate method arguments in such a way that they reveal their expected type, e.g., aString, anInt, or string: String. Recent studies confirmed that these type annotations are indeed frequently used by developers in dynamically-typed languages. We propose a lightweight heuristic that uses these hints from method argument names to augment the performance of a static type inference algorithm. The evaluation through a proof-of-concept prototype implemented in Pharo Smalltalk shows that the augmented algorithm outperforms the basic algorithm, and correctly infers types for 81% more method arguments
    corecore